<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        .w{
            /*当开启flex，项目默认再主轴（默认是水平方向）方向排列*/
            display:flex;
            /*改变主轴方向*/
            /*
            默认值：
            flex-direction:row;
           reverse 翻转
            flex-direction: row-reverse;
            更改主轴方向，变成垂直方向
                     flex-direction:column;
            */
            flex-direction:column-reverse;


            width:1220px;
            height:800px;
            background-color: darkred;
            margin:0 auto;
        }
        .item{
            width:200px;
            height:200px;
            background-color: #ff8500;
        }

    </style>
</head>
<body>
<div class="w">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>

</div>
</body>
</html>